package com.basic.business.storeIndicators.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.basic.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import com.basic.common.utils.StringUtils;
import com.basic.common.utils.uuid.ULID;

/**
 * 店铺指标数据对象 t_store_indicators
 *
 * @author zhaoxy_jn@163.com
 * @date 2025-02-10
 */
@Getter
@Setter
@ExcelIgnoreUnannotated
public class TStoreIndicators extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private String id;

    /** 文件id */
    @ExcelProperty(value = "文件id")
    private String fileId;

    /** 店铺id */
    @ExcelProperty(value = "店铺id")
    private String storeId;

    /** 统计日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "统计日期")
    private Date statDate;

    /** 成功退货退款金额 */
    @ExcelProperty(value = "成功退货退款金额")
    private BigDecimal successGoodsRefundAmount;

    /** 支付金额 */
    @ExcelProperty(value = "支付金额")
    private BigDecimal payAmount;

    /** 分期支付金额 */
    @ExcelProperty(value = "分期支付金额")
    private BigDecimal stagesPayAmount;

    /** 支付件数 */
    @ExcelProperty(value = "支付件数")
    private Integer payQuantity;

    /** 商品加购人数 */
    @ExcelProperty(value = "商品加购人数")
    private Integer goodsAddPeopleNumber;

    /** 商品加购件数 */
    @ExcelProperty(value = "商品加购件数")
    private Integer goodsAddQuantity;

    /** 商品浏览量 */
    @ExcelProperty(value = "商品浏览量")
    private Integer goodsPageViewNumber;

    /** 商品访客数 */
    @ExcelProperty(value = "商品访客数")
    private Integer goodsVisitorNumber;

    /** 商品微详情访客数 */
    @ExcelProperty(value = "商品微详情访客数")
    private Integer goodsDetailVisitorNumber;

    /** 商品收藏人数 */
    @ExcelProperty(value = "商品收藏人数")
    private Integer goodsCollectPeopleNumber;

    /** 商品平均停留时长 */
    @ExcelProperty(value = "商品平均停留时长")
    private Integer goodsStopDuration;

    /** 下单买家数 */
    @ExcelProperty(value = "下单买家数")
    private Integer placeOrderBuyNumber;

    /** 支付买家数 */
    @ExcelProperty(value = "支付买家数")
    private Integer payBuyNumber;

    /** 下单转化率 */
    @ExcelProperty(value = "下单转化率")
    private String placeOrderConversionRate;

    /** 商品详情页跳出率 */
    @ExcelProperty(value = "商品详情页跳出率")
    private String goodsDetailDapRate;

    /** 下单金额 */
    @ExcelProperty(value = "下单金额")
    private BigDecimal placeOrderAmount;

    /** 访问收藏转化率 */
    @ExcelProperty(value = "访问收藏转化率")
    private String collectConversionRate;

    /** 访问加购转化率 */
    @ExcelProperty(value = "访问加购转化率")
    private String addPurchaseConversionRate;

    /** 支付老买家数 */
    @ExcelProperty(value = "支付老买家数")
    private Integer payOldBuyNumber;

    /** 老买家支付金额 */
    @ExcelProperty(value = "老买家支付金额")
    private BigDecimal oldBuyPayAmount;

    /** 支付转化率 */
    @ExcelProperty(value = "支付转化率")
    private String payConversionRate;

    /** 支付新买家数 */
    @ExcelProperty(value = "支付新买家数")
    private Integer payNewBuyNumber;

    /** 有支付商品数 */
    @ExcelProperty(value = "有支付商品数")
    private Integer havePayGoodsNumber;

    /** 下单件数 */
    @ExcelProperty(value = "下单件数")
    private Integer placeOrderNumber;

    /** 有访问商品数 */
    @ExcelProperty(value = "有访问商品数")
    private Integer haveVisitGoodsNumber;

    /** 客单价 */
    @ExcelProperty(value = "客单价")
    private BigDecimal customerOrderPrice;

    /** 状态 正常：NORMAL 删除：DELETED 锁定：LOCKED */
    @ExcelProperty(value = "状态 正常：NORMAL 删除：DELETED 锁定：LOCKED")
    private String status;

    public void setId(String id) {
        this.id = StringUtils.isNotEmpty(id) ? id : ULID.getId();
    }

    //店铺名称
    private String storeName;

    /*搜索条件字段*/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date statDateStart;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date statDateEnd;

    private BigDecimal successGoodsRefundAmountMin;
    private BigDecimal successGoodsRefundAmountMax;

    private BigDecimal payAmountMin;
    private BigDecimal payAmountMax;

    private Integer payQuantityMin;
    private Integer payQuantityMax;

    private Integer goodsAddPeopleNumberMin;
    private Integer goodsAddPeopleNumberMax;

    private Integer goodsAddQuantityMin;
    private Integer goodsAddQuantityMax;

    private Integer goodsVisitorNumberMin;
    private Integer goodsVisitorNumberMax;

    private Integer goodsCollectPeopleNumberMin;
    private Integer goodsCollectPeopleNumberMax;

    private Integer goodsStopDurationMin;
    private Integer goodsStopDurationMax;

    private Integer payBuyNumberMin;
    private Integer payBuyNumberMax;

    private Integer payOldBuyNumberMin;
    private Integer payOldBuyNumberMax;

    private BigDecimal oldBuyPayAmountMin;
    private BigDecimal oldBuyPayAmountMax;

    private Integer havePayGoodsNumberMin;
    private Integer havePayGoodsNumberMax;

    private Integer haveVisitGoodsNumberMin;
    private Integer haveVisitGoodsNumberMax;

    private BigDecimal customerOrderPriceMin;
    private BigDecimal customerOrderPriceMax;

    private String goodsDetailDapRateMin;
    private String goodsDetailDapRateMax;

    private String payConversionRateMin;
    private String payConversionRateMax;

    //排序
    private String prop;
    private String order;
}
